package com.otaliastudios.cameraview.livedata

import androidx.annotation.MainThread
import androidx.lifecycle.MutableLiveData


class FpsLiveData(fps: Int = 15) : MutableLiveData<Int>(fps) {
    companion object {
        private lateinit var sInstance: FpsLiveData

        @MainThread
        fun get(): FpsLiveData {
            sInstance = if (Companion::sInstance.isInitialized) sInstance else FpsLiveData()
            return sInstance
        }
    }

}